<template>
  <div class="bottom-bar">
    <div class="bar-item bar-left">
      <div>
        <span class="icon service"></span>
        <span class="text">客服</span>
      </div>
      <div>
        <span class="icon shop"></span>
        <span class="text">店铺</span>
      </div>
      <div>
        <span class="icon"></span>
        <span class="text">收藏</span>
      </div>
    </div>
    <div class="bar-item bar-right">
      <div class="cart" @click="addToCart">加入购物车</div>
      <div class="buy">购买</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'IshopDetailbottombar',

  data() {
    return {
      
    };
  },

  mounted() {
    
  },

  methods: {
    addToCart(){
      this.$emit('addToCart');
    }
  },
};
</script>

<style scoped>
.bottom-bar{
  background-color: #fff;
  height: 58px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  box-shadow: 0px -1px 1px rgba(150,150,150, .2);
}
.bar-item{
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
}
.bar-left > div{
  flex:1;
}



.bar-left .icon{
  display: block;
  width: 22px;
  height: 22px;
  background: url("~assets/img/detail/detail_bottom.png") 0 0/100% no-repeat;
  margin: auto;
}

.bar-left .text{
  font-size: 13px;
}

.bar-left .service{
  background-position: 0 -54px;
}

.bar-left .shop{
  background-position: 0 -98px;
}

.bar-right > div{
  flex:1;
}

.bar-right {
    font-size: 15px;
    color: #fff;
    line-height: 58px;
}

.bar-right .cart {
    background-color: #ffe817;
    color: #333;
  }

  .bar-right .buy {
    background-color: #f69;
  }

</style>